﻿using agsXMPP.Xml.Dom;

namespace Lapd.Common.CustomStanzas
{
    public class SampleField: Element
    {
        /*
            <samplefield datatype="long" value="1">
            </samplefield>
         */

        public SampleField()
        {
            TagName = ServiceDdsConstants.WRITE_SAMPLE_FIELD_TAG;
        }

        public SampleField(string dataType, string value)
            : this()
        {
            DataType = dataType;
            ValueAttribute = value;
        }

        public string DataType
        {
            get
            {
                return GetAttribute(ServiceDdsConstants.WRITE_SAMPLE_FIELD_DATATYPE_ATTRIBUTE);
            }

            set
            {
                SetAttribute(ServiceDdsConstants.WRITE_SAMPLE_FIELD_DATATYPE_ATTRIBUTE, value);
            }
        }

        public string ValueAttribute
        {
            get
            {
                return GetAttribute(ServiceDdsConstants.WRITE_SAMPLE_FIELD_VALUE_ATTRIBUTE);
            }

            set
            {
                SetAttribute(ServiceDdsConstants.WRITE_SAMPLE_FIELD_VALUE_ATTRIBUTE, value);
            }
        }
    }
}
